package
{
	import as3isolib.core.IIsoDisplayObject;
	
	import flash.geom.Vector3D;

	public class PathNode
	{
		public var displayObject:IIsoDisplayObject;
		public var v3:Vector3D
		public var branches:Vector.<PathVector>;
		
		public function PathNode(v3:Vector3D)
		{
			this.v3 = v3;
			this.displayObject = Global.getPathNodeImage();
			this.displayObject.x = v3.x;
			this.displayObject.y = v3.y;
			this.displayObject.z = v3.z;
		}
		
		public function subtract(pathNode:PathNode):PathNode{
			return new PathNode(this.v3.subtract(pathNode.v3));
		}
		
		public function add(pathNode:PathNode):PathNode{
			return new PathNode(this.v3.add(pathNode.v3));
		}		
		
		public function clone():PathNode{
			return new PathNode(this.v3.clone());
		}
		
		public function normalize():Number{
			return this.v3.normalize();
		}
		
		public function scaleBy(s:Number):void{
			this.v3.scaleBy(s);
		}
		
		public function get x():Number{
			return this.v3.x;	
		}
		
		public function get y():Number{
			return this.v3.y;
		}
		
		public function get z():Number{
			return this.v3.z;
		}
		
		public function get length():Number{
			return this.v3.length;
		}
	}
}